Learn R Programming

albatross (version 0.3-8)

[.feemcube: Extract or replace parts of FEEM cubes

Description

Extract or replace single intensities, vectors of them, whole FEEM spectra or even data cubes or their parts from a FEEM cube.

Usage

# S3 method for feemcube
[(x, i, j, k, drop = TRUE)
  # S3 method for feemcube
[(x, i, j, k) <- value

Value

For [: If choosing multiple values along each axis or

drop is FALSE, a FEEM cube object. If choosing only one sample but multiple wavelengths, a FEEM object. Otherwise, a named numeric matrix or vector, depending on the dimensions chosen.

For [<-: a FEEM cube object.

Arguments

x

A FEEM cube object.

i, j, k

Row, column and sample indices, respectively. As usual, may be integer, logical or character vectors. Omitting a parameter results in choosing the whole axis.

drop

Coerce result to the lowest possible dimension (dropping the feemcube class).

value

An array-like object to assign values from. When assigning from FEEM or FEEM cube objects, wavelengths are required to match and warnings are issued if scale factors don't match. Use vector subsetting (zero or one argument inside the brackets) to disable the check.

See Also

feemcube, [.feem

Examples

Run this code
  z <- feemcube(array(1:385, c(5, 7, 11)), 1:5, 1:7, 1:11)
  str(z[1:4, 1:2, 1:2])
  z[2:3, 4:5, 3] <- feem(matrix(1:4, 2), 2:3, 4:5, 3)
  z[,,3]

Run the code above in your browser using DataLab